This page last changed on May 24, 2006 by any2xml.

This component can be used to proxy REST style services as local Mule Components. The org.mule.components.rest.RESTServiceWrapper can be configured with a service URL. A number of properties will allow you to configure the parameters and error conditions on the service.

Property Description Required
serviceUrl the REST service url to invoke. If any parameters are specified on this url they will always be included on the Url invoked. Yes unless the urlFromMessage is set to true
urlFromMessage Determines if the REST URL to invoke should be obtained for the message. The rest.service.url property should be set on the message. No
requiredParams A list of required parameters that must be set on the REST serviceUrl. These can either be set explicity on the serviceUrl or the parameters must exist as properties on the current message. No
optionalParams A list of optional parameters that will be set on the service URL if they are available, but no error will occur if the parameters are not set on the message.
httpMethod The Http method to use when invoking the service. No. Default is GET.
payloadParameterName This is the name of the parameter to set on the service URL that will be set to the message payload. If this is not set, the message payload is still sent in the body of the request. No
errorFilter By default the RESTServiceWrapper uses a Regular Expression filter on REST service invocation result to determine if an error occurred. However, any filter configuration can be used to determine an error result by setting the errorFilter No
errorExpression A RegEx expression to execute on the result of the service invocation to determine if an error occurred. No (if the errorFilter is set explicitly)

The Stock Quote Example demonstrates how to configure the RESTServletWrapper. It calls an ASPX Stock Quote service hosted by http://www.webservicex.net.

Document generated by Confluence on Nov 27, 2006 10:27